package com.dkm.ec.sale.domain;

import java.util.HashMap;
import java.util.Map;

public class SaleConstants {
	
	/**
	 * 后台管理员前台展示的头像
	 */
	public final static String ADMIN_PROFILE_100X100 = "http://img.skg.com/MemberMedia/official-100x100.png";
	public final static String ADMIN_PROFILE_32X32 = "http://img.skg.com/MemberMedia/official-32x32.png";
	/**
	 * 销售实体-销售类型
	 */
	public final static class SALE_TYPE{
		public final static String STOCK = "stock";	//按库存销售
		public final static String PRE_ORDER = "pre_order";	//预售
		public final static String STOCK_AND_BACK = "stock_and_back";	//按库存并缺货销售
		public final static String ALWAYS = "always";	//永远可售
		public final static String GROUP = "group";	//团购
		public final static String SECOND_KILL = "second_kill";	//秒杀
		public final static String RUSH = "rush";	//抢购
	}
	
	/**
	 * 销售价格-类型
	 */
	public final static class PRICE_TYPE{
		public final static String SALES_PRICE = "sales_price";	//销售价
		public final static String WHOLE_PRICE = "whole_price";	//批发价
		public final static String PRE_PRICE = "pre_price";	//预售价
		public final static String BACK_ORDER = "back_order";	//缺货销售价
		public final static String SECOND_KILL = "second_kill";	//秒杀价
		public final static String RUSH = "rush";	//抢购
		public final static String GROUP = "group";	//团购
		public final static String MOBILE = "mobile";	//手机价
		public final static String IN_PRICE = "in_price";	//内购价
	}
	
	public static Map<String, String> SALE_TYPE_TO_PRICE_MAP = new HashMap<String, String>();
	public static Map<String, String> PRICE_TO_SALE_TYPE_MAP = new HashMap<String, String>();
	static{
		//将销售类型跟销售价格对应
		SALE_TYPE_TO_PRICE_MAP.put(SALE_TYPE.STOCK, PRICE_TYPE.SALES_PRICE);
		SALE_TYPE_TO_PRICE_MAP.put(SALE_TYPE.PRE_ORDER, PRICE_TYPE.PRE_PRICE);
		SALE_TYPE_TO_PRICE_MAP.put(SALE_TYPE.STOCK_AND_BACK, PRICE_TYPE.BACK_ORDER);
		SALE_TYPE_TO_PRICE_MAP.put(SALE_TYPE.ALWAYS, PRICE_TYPE.SALES_PRICE);
		SALE_TYPE_TO_PRICE_MAP.put(SALE_TYPE.GROUP, PRICE_TYPE.GROUP);
		SALE_TYPE_TO_PRICE_MAP.put(SALE_TYPE.SECOND_KILL, PRICE_TYPE.SECOND_KILL);
		SALE_TYPE_TO_PRICE_MAP.put(SALE_TYPE.RUSH, PRICE_TYPE.RUSH);
		
		PRICE_TO_SALE_TYPE_MAP.put(PRICE_TYPE.SALES_PRICE, SALE_TYPE.STOCK);
		PRICE_TO_SALE_TYPE_MAP.put(PRICE_TYPE.PRE_PRICE, SALE_TYPE.PRE_ORDER);
		PRICE_TO_SALE_TYPE_MAP.put(PRICE_TYPE.BACK_ORDER, SALE_TYPE.STOCK_AND_BACK);
		PRICE_TO_SALE_TYPE_MAP.put(PRICE_TYPE.GROUP, SALE_TYPE.GROUP);
		PRICE_TO_SALE_TYPE_MAP.put(PRICE_TYPE.SECOND_KILL, SALE_TYPE.SECOND_KILL);
		PRICE_TO_SALE_TYPE_MAP.put(PRICE_TYPE.RUSH, SALE_TYPE.RUSH);
	}
	
	/**
	 * 销售实体-产品形态
	 */
	public final static class SE_TYPE{
		public final static String ENTITY = "entity";	//实体产品
		public final static String PACKAGE = "package";	//产品套餐
		public final static String SOFTWARE = "software";	//软体产品
		public final static String SERVICE = "service";	//服务
	}
	
	/**
	 * SKU状态
	 */
	public final static class SKU_STATUS{
		public final static String ON_SALE = "on_sale";	//上架
		public final static String NOT_ON_SELL = "not_on_sell";	//下架
		public final static String DELETE = "delete";	//删除
		public final static String SOLD_OUT = "sold_out";	//售罄
		public final static String RUSH_END = "rush_end";	//抢购结束
		public final static String RUSH_NOT_START = "rush_not_start";	//抢购还未开始
	}

}
